import { createCLI } from './core/cli.js';
import { builtInCommands } from './commands/index.js';

export async function run(): Promise<void> {
  const cli = createCLI();
  
  // Register built-in commands
  const commandRegistry = cli.getCommandRegistry();
  for (const command of builtInCommands) {
    commandRegistry.register(command);
  }
  
  // Run the CLI
  await cli.run();
}

// Export for programmatic usage
export { createCLI } from './core/cli.js';
export * from './core/index.js';
export * from './utils/index.js';
export * from './types/index.js';
export * from './commands/index.js';
